import Vue from 'vue'
import Router from 'vue-router'
import './styles/reset.css'
import './styles/element-theme/index.css'
import './styles/index.scss'
import './components/styles/index.scss'
import globalMixin from './utils/mixins/global'
import routes from './route.config.js'
import store from './store'
import App from './App.vue'
import * as ElementUI from '@element-ui'
import * as EUI from './components/global'
import './directives'
import imgDefault from '../static/images/default/img.png'
import imgMatchDefault from '../static/images/default/match.png'
import avatarDefault from '../static/images/default/avatar.png'
import placeholderDefault from '../static/images/default/placeholder.png'

// 修改组件引用的默认图片地址

EUI.Img.props.defaultSrc.default = imgDefault
EUI.ImgMatch.props.defaultSrc.default = imgMatchDefault
EUI.Avatar.props.defaultSrc.default = avatarDefault
EUI.Placeholder.props.src.default = placeholderDefault

Vue.use(Router)
Vue.use(ElementUI)
Vue.use(EUI)
Vue.mixin(globalMixin)

new Vue({ // eslint-disable-line
  router: new Router({
    routes: routes
  }),
  store,
  el: '#app',
  render: h => h(App)
})
